package homework03;

/**
 * 手机卡类 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 行为：显示（卡号 + 用户名 + 当前余额）
 */

public class Sim {
    private SimType type;          //卡类型
    private String username;      //用户名
    private String password;      //密码
    private String tel_no;        //卡号
    private int balance;          //账户余额
    private int talk_time;        //通话时长
    private int flow;             //上网流量

    public Sim() {
    }

    public Sim(String username, String tel_no, int balance, SimType simType) {
        setUsername(username);
        setTel_no(tel_no);
        setBalance(balance);
        setType(simType);
    }


    public SimType getType() {
        return type;
    }

    public void setType(SimType type) {
        this.type = type;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTel_no() {
        return tel_no;
    }

    public void setTel_no(String tel_no) {
        this.tel_no = tel_no;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public void show() {
        System.out.println("卡号：" + getTel_no());
        System.out.println("用户名：" + getUsername());
        System.out.println("账户余额：" + getBalance());
        System.out.println("卡类型是：" + getType().getDesc());
    }
}
